package com.kaoshi.mapper;

import com.kaoshi.pojo.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NewsMapper {
    List<News> getNews();

    News getNameNews(@Param("name") String name);

    News getIdNews(@Param("id") int id);

    //搜索查询咨询
    List<News> selectlinkTitleNews(@Param("title") String title);

    //增加咨询
    int addNew(News news);

    //修改咨询
    int updateNew(News news);

    //删除咨询
    int deleteNew(@Param("id") int id);
}